package com.smartleanx.module.hrm.intergration;

import com.smartleanx.framework.common.pojo.CommonResult;
import com.smartleanx.module.system.api.permission.RoleApi;
import com.smartleanx.module.system.api.permission.dto.RoleRespDTO;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.List;

/**
 * 角色服务
 */
@Component
public class RoleServiceProvider {
    @Resource
    private RoleApi roleApi;

    public List<RoleRespDTO> getAllRoleList(){
        return roleApi.getAllRoleList().getCheckedData();
    }

    public RoleRespDTO getByCode(String code){
        return roleApi.getByCode(code).getCheckedData();
    }

    public List<RoleRespDTO> selectListByCode(String code){
        return roleApi.selectListByCode(code).getCheckedData();
    }
}
